<h1>Helper Plugin</h1>

<p>The <em>helper</em> plugin gives you access to two handy functions for language and time.</p>

<p>The helper plugin's slug is <strong>helper</strong>, so it can be used like so:</p>

<pre class="tags">{pyro:helper:<em>function</em>}</pre>

<h2>Functions</h2>

<h3>{pyro:helper:lang}</h3>

<p>Displays a language line in the language of the current language.</p>

<p><strong>Parameters</strong></p>

<table cellpadding="0" cellspacing="0">

	<tr>
		<th>Parameter</th>
		<th>Description</th>
	</tr>
	
	<tr>
		<td width="100">line</td>
		<td>Required. The slug for the language line you want to display.</td>
	</tr>

</table>

<p><strong>Example:</strong></p>

<pre><code>{pyro:helper:lang line="error_message"}</code></pre>

<pre><code>Error!</code></pre>

<br />

<h3>{pyro:helper:date}</h3>

<p>Displays a formatted date for the current time or a timestamp you specify.</p>

<p><strong>Parameters</strong></p>

<table cellpadding="0" cellspacing="0">

	<tr>
		<th>Parameter</th>
		<th>Description</th>
	</tr>
	
	<tr>
		<td width="100">format</td>
		<td>Required. Format for the output. This plugin uses PHP's <a href="http://php.net/manual/en/function.date.php">date</a> or <a href="http://php.net/manual/en/function.strftime.php">strftime</a> formatting syntax.</td>
	</tr>
	<tr>
		<td width="100">timestamp</td>
		<td>UNIX timestamp to use instead of the current date.</td>
	</tr>

</table>

<p><strong>Example:</strong></p>

<pre><code>{pyro:helper:date format="Y"}</code></pre>

<pre><code>2011</code></pre>

<br />

<h3>{pyro:helper:gravatar}</h3>

<p>Displays an avatar using gravatar API.</p>

<p><strong>Parameters</strong></p>

<table cellpadding="0" cellspacing="0">

	<tr>
		<th width="100">Parameter</th>
		<th width="100">Default</th>
		<th>Description</th>
	</tr>
	<tr>
		<td>email</td>
		<td>None</td>
		<td>Required. The Email address used to generate the gravatar.</td>
	</tr>
	<tr>
		<td>size</td>
		<td>50</td>
		<td>The size of the gravatar in pixels. A size of 50 would return a gravatar with a width and height of 50px.</td>
	</tr>
	<tr>
		<td>rating</td>
		<td>g</td>
		<td>The rating of the gravatar. Possible values are g, pg, r or x.</td>
	</tr>
	<tr>
		<td>url_only</td>
		<td>false</td>
		<td>true or false. Set this to TRUE if you want the plugin to only return the gravatar URL instead of the HTML.</td>
	</tr>

</table>

<p><strong>Example:</strong></p>

<pre><code>{pyro:helper:gravatar email="user@example.com" size="20"}</code></pre>

<pre><code>&lt;img src='http://www.gravatar.com/avatar/b58996c504c5638798eb6b511e6f49af?s=20&amp;r=g' alt='Gravatar' class='gravatar' /&gt;</code></pre>